//下液面检测,有水输出高电压，无水输出低电压

#ifndef _HEADER_WaterLineDown_H
#include "WaterLineDown.h"
#endif

WaterLineDown::WaterLineDown(/* args */)
{
}

WaterLineDown::~WaterLineDown()
{
}

void WaterLineDown::setPort(int port)
{
    this->port = port;
    pinMode(port,INPUT);
}

void WaterLineDown::have()
{
    //检测状态
    int retval = analogRead(port);
    retval == HIGH;
    this->state = true;
}

void WaterLineDown::no()
{
    //检测状态
    int retval = analogRead(port);
    retval == LOW;
    this->state = false;
}
